<!--//<=============================Script developpé par MOUMMID HAMZA >======================//-->
{extends file="skulton.tpl"}{/extends}
{block name="monblock"}
<script src="scripts/js/Form.js"></script>
<script type="text/javascript" charset="utf-8">
	var asInitVals = new Array();
	$(document).ready(function() {
/***affichage dialog de confirmation xsl*/
            $(".rep").click(function(){
                   var a = $(this);
                   $( "#dialog-confirmXSL" ).dialog({
                       resizable: false,
                       modal: true,
                       buttons: {
                         "Générer": function() {
                
                           document.location.href="genererXSL.php?&page=intervention";
                         },
                         "non": function() {
                           $( this ).dialog( "close" );
                         }
                       }
                   });
                 });
        //datatable
		var oTable = $('#idtable').dataTable( {
			"sPaginationType": "full_numbers",
			"oLanguage": {
				"sSearch": "Rechercher:"
			}
		} );

		//recherche spécifique à la colone
		$("tfoot input").keyup( function () {
			oTable.fnFilter( this.value, $("tfoot input").index(this) );
		} );
		
		$("tfoot input").each( function (i) {
			asInitVals[i] = this.value;
		} );

		$("tfoot input").focus( function () {
			if ( this.className == "search_init" )
			{
				this.className = "";
				this.value = "";
			}
		} );

		$("tfoot input").blur( function (i) {
			if ( this.value == "" )
			{
				this.className = "search_init";
				this.value = asInitVals[$("tfoot input").index(this)];
			}
		} );

	} );
</script>
    <div class="content-box"><!-- body-->
	    <div class="content-box-header">
		  <h3>Liste des interventions</h3>
		  <!--partie traiter par MEZOUARI KHALID-->
		  <a href="generePDF.php?&page=intervention"  style='margin-left:10px;'><img src="images/icons/PDF.png" ></a>
          <a href="#" class="rep" style='margin-left:10px;'><img src="images/icons/excel.png" ></a>
         <!--Fin partie réalisée par MEZOUARI KHALID-->
     	</div> <!-- End .content-box-:>header -->
		<div class="tab-content default-tab" id="tab1"> 
	    <!--confirmer la generation XSL avec un dialog-->
        <div style="display:none;" id="dialog-confirmXSL" title="Demande de confirmation">
              <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Voulez-vous vraiment générer ce fichier dans le bureau ?</p>
        </div>
		<table id="idtable">

        			   <thead>
        					<tr>
        					   <th><input class="check-all" type="checkbox" /></th>
        					   <th>objectif<img src="images/icons/sort.png" width="20px"alt="Imprimer" /></th>
        					   <th>designation<img src="images/icons/sort.png" width="20px"alt="sort" /></th>
        					   <th>datedebut<img src="images/icons/sort.png" width="20px"alt="sort" /></th>
        					   <th>demande par<img src="images/icons/sort.png" width="20px"alt="sort" /></th>
        					   <th>Cible<img src="images/icons/sort.png" width="20px"alt="sort" /></th>
        					</tr>
        				</thead>

        				<tbody>
        				  {foreach $listinterv as $line}
        					<tr>
        						<td><input type="checkbox" /></td>
        						<td>{$line->getObjectif()}</td>
        						<td>{$line->getDesignation()}</td>
        						<td>{$line->getDateDebut()}</td>
        						<td>{$nomadedao->loadNomade($line->getIdNomade())->getNom()} {$nomadedao->loadNomade($line->getIdNomade())->getPrenom()}</td>
                                <td> {$nomadedao->loadNomade($line->getIdNomadeCible())->getNom()} {$nomadedao->loadNomade($line->getIdNomadeCible())->getPrenom()}</td>
          					</tr>
        				  {/foreach}
        				</tbody>

				        <tfoot>
        					<tr>
        						<th><input type="text" name="search_id" value="" class="search_int" style="display:none" /></th>
        						<th><input type="text" name="search_objectif" value="" class="search_int" /></th>
        						<th><input type="text" name="designation" value="" class="search_int"  /></th>
        						<th><input type="text" name="search_dateDebut" value="" class="search_int"  /></th>
        						<th><input type="text" name="search_nomade" value="" class="search_int"  /></th>
        						<th><input type="text" name="search_nomadeCible" value="" class="search_int"  /></th>
        					</tr>
			      	   </tfoot>
			       </table>
                 
         </div> <!-- fin #tab2 -->
    </div> <!-- fin .content-box-content -->
  {/block}